1. Field
The present invention relates to a method, system, and program for removing alias addresses from an alias address pool.
2. Description of the Related Art
In certain computing environments, multiple host systems may communicate with multiple control units (CUs) (also known as storage controllers, storage subsystems, enterprise storage servers, etc.) providing access to storage devices, such as interconnected hard disk drives through one or more logical paths. The interconnected drives may be configured as a Direct Access Storage Device (DASD), Redundant Array of Independent Disks (RAID), Just a Bunch of Disks (JBOD), etc. The control unit may configure one or more logical subsystems (LSSs), where each LSS is configured to include multiple volumes.
The host system may include a channel subsystem that maintains information to access volumes in an LSS from the control unit. The channel subsystem includes subchannels, which provides state tracking for the execution of the I/O operations for the channel subsystem and provides information on paths connecting the host to a volume in an LSS. The host operating system maintains a unit control block (UCB) providing information on a base unit address assigned to one volume and the subchannel that the channel subsystem uses to access the volume on the base device. The channel subsystem is aware of individual subchannels and the paths they have. The customer initially assigns aliases to bases via external tools to the CU. The operating system can dynamically change the binding of aliases to bases given changes in the workload requirements. Further, the control unit may assign alias addresses to the base addresses for volumes, where the alias addresses are used to allow concurrent I/O requests to be directed to the same volume. The UCB for a base volume maintains information on the alias addresses assigned to that volume. The host processes the information in the UCB to address an I/O operation to a volume. In particular, the host initiates an I/O operation toward a volume by initiating a channel program which consists of a series of I/O instructions, such as a chain of channel command word (CCW) commands, at the subchannel.
The control unit maintains a different view of the system. The control unit is provided a base unit address for each device (volume) and zero or more alias unit addresses for each base unit address. After assigning a base address to each volume (device), the remaining addresses can be allocated as alias addresses to the base addresses. The control unit uses the unit addresses to physically access the volumes.
An I/O operation or chain of CCW commands can be simultaneously executed toward the same logical volume using the different base and alias unit addresses for the logical volume. In this way, the executed CCW commands are all directed toward the same logical volume using different addresses, wherein each address uses one of multiple channel paths to reach a single logical volume. This allows a single host to concurrently execute multiple I/O operations against a single volume. The number of aliases provided for a base may be set according to the size of the volume and the number of concurrent users. In certain cases, only a few aliases may be needed to accommodate network traffic for a particular base address for a volume. Further, the number of aliases associated with a logical volume may be dynamically changed by the Work Load Manager (WLM) based on the goals for the work load.
The host first attempts to access a volume (I/O device) through the base UCB for the volume. If the base UCB is unavailable, i.e., concurrently servicing another I/O operation, then the host may use one of the available alias UCBs assigned to that base UCB to concurrently access the volume. The host system then performs the I/O operations through the subchannel associated with the UCB and the channel paths provided for that subchannel.
In current systems, the alias addresses available for assignment to a base address for a volume in an LSS are maintained in an alias address pool. The pool comprises alias address control blocks, where each alias address control block includes a pointer to a next alias address control block in the pool and the last alias address control block includes a null pointer. An LSS control block maintains a pointer to the first alias address control block in the pool. Alias addresses are removed or added to the pool by removing or adding an alias address control block to the first control block in the pool of linked control blocks, which is the control block identified by the pointer in the LSS control block.
In a multiple processor (CPU) host system with heavy demand for alias usage, there may be constant change to the queue representing the pool of free aliases. Each CPU may perform I/O related work that utilizes alias addresses, which may involve obtaining/returning an alias from/to the pool. Alterations to the free alias pool may be serialized to ensure queue integrity. Access to remove or add an alias address to the first entry of the alias address pool can be serialized by using a single spin lock or a compare double swap technique. A spin lock may not be chosen due to potential conflicts with other processes using spin locks. Instead, a compare double swap serialization may be used. The compare and double swap serialization technique may provide serialization when the queue is used in a last-in, first-out (LIFO) manner.
According to the compare double swap technique, when a process seeks to add or remove an alias address control block to the first entry in the pool, the host operating system makes a copy of the pointer to the first alias address control block in the pool and a counter indicating a number of processes pending completed against the pool to remove or add alias addresses. When the process is ready to remove or add an alias address control block to the first entry in the pool, the copy of the pointer and counter is compared with the current actual values maintained in the LSS control block. If the copy matches the actual values, then the host operating system proceeds with the addition or removal of the first control block entry in the storage pool. If the copy does not match the actual values, then the compare and double swap process is performed again by making a new copy of the actual counter and pointer values in the LSS control block and then again performing the check before attempting the change to the first control block entry in the pool.